Repository navigation
Refactor proto definitions into geometry, datastructures, and message files - #77
Conversation
Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
|
@copilot please restore the |
… files Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
Done! I've separated the proto definitions into three files:
This structure now better reflects the COMPAS 2nd level package organization. All tests pass and asset generation works correctly. Commit: cd24712 |
Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
|
@copilot just one last thing. please update the changelog with the changes in this PR |
Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the protobuf schema organization by consolidating 31 separate .proto files into three well-organized files that align with COMPAS package structure. This is a structural improvement with no API changes.
Changes:
- Consolidated proto definitions into
geometry.proto(forcompas.geometrytypes),datastructures.proto(forcompas.datastructurestypes), andmessage.proto(for internal serialization framework) - Updated imports in
conversions.pyandcore.pyto use the new module structure (geometry_pb2,datastructures_pb2,message_pb2) - Fixed spelling in
message.protocomment ("arbitrate" → "arbitrary") - Updated developer documentation to reflect the new three-file structure
Reviewed changes
Copilot reviewed 4 out of 72 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/compas_pb/protobuf_defs/compas_pb/generated/geometry.proto | New consolidated file containing all geometry primitives (points, vectors, curves, surfaces, transformations) from compas.geometry |
| src/compas_pb/protobuf_defs/compas_pb/generated/datastructures.proto | New consolidated file containing COMPAS datastructures (Mesh, Polyhedron) with import of geometry types |
| src/compas_pb/protobuf_defs/compas_pb/generated/message.proto | Updated with spelling correction ("arbitrary" instead of "arbitrate") |
| src/compas_pb/conversions.py | Updated to import from consolidated modules (geometry_pb2, datastructures_pb2) instead of 31+ individual modules |
| src/compas_pb/generated/*.py | Auto-generated Python code from new proto files |
| src/compas_pb/generated/*.pyi | Auto-generated type stub files |
| docs/missing_compas_type.md | Updated developer guide explaining where to add new types based on COMPAS package |
| docs/protobuf.md | Auto-regenerated documentation showing the new three-file structure |
| (deleted files) | Removed 31 original .proto files and 62 generated .py/.pyi files |
Refactored 31 separate
.protofiles into three organized files that better reflect COMPAS package structure:geometry.proto,datastructures.proto, andmessage.proto.What type of change is this?
Changes
Proto definitions: Organized into three logical files matching COMPAS package structure:
geometry.proto- Geometry primitives fromcompas.geometry(Point, Vector, Frame, curves, surfaces, transformations, Pointcloud)datastructures.proto- COMPAS datastructures fromcompas.datastructures(MeshData, PolyhedronData, FaceList, FaceData)message.proto- Serialization framework types (AnyData, FallbackData, ListData, DictData, MessageData) for internal useCode updates:
conversions.py: Now imports bothgeometry_pb2anddatastructures_pb2modulescore.py: Updated to importmessage_pb2module.proto+ 62 generated.py/.pyi).proto+ 6 generated.py/.pyi)Documentation:
missing_compas_type.md: Updated developer guide to reflect new three-file structure and explain where to add new types based on COMPAS packageprotobuf.md: Auto-regenerated from new schema showing all three proto filesCHANGELOG.md: Added entry documenting the proto refactoring changesImpact
No API changes. Generated protobuf messages remain functionally identical. Asset generation for all target languages (cpp, csharp, java, objc, php, ruby) verified working. The new structure makes it clearer where to add new types based on whether they belong to
compas.geometry,compas.datastructures, or the internal serialization framework.Checklist
CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas.datastructures.Mesh.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.